<button lv-button (click)="clearSort()">Clear sort</button>
<lv-datatable
  [lvData]="data"
  #lvTable
  lvSort
  #sort="lvSort"
  [(lvActiveSort)]="activeSort"
  [lvSortDirct]="sort"
  (lvStateChange)="stateChange($event)"
  lvResize
  lvResizeMode="expand"
  [lvScroll]="{ x: '100%' }"
>
  <thead>
    <tr>
      <th lvShowSort lvCellKey="id" [lvDisableSortClear]="true">Id</th>
      <th lvShowSort lvCellKey="name">Name</th>
      <th lvShowSort lvCellKey="color">Color</th>
      <th lvShowSort lvCellKey="age" [lvCustomSort]="customSortAge">Age</th>
      <th lvShowSort lvCellKey="random">Random</th>
    </tr>
  </thead>
  <tbody>
    <ng-container *ngFor="let item of lvTable.renderData">
      <tr>
        <td>{{ item.id }}</td>
        <td>{{ item.name }}</td>
        <td>{{ item.color }}</td>
        <td>{{ item.age }}</td>
        <td>{{ item.random }}</td>
      </tr>
    </ng-container>
  </tbody>
</lv-datatable>
